import api from "@/util/api";

const plantInformationApi = {
  findAll(pageNum, size, params = {}) {
    return api
      .get("/plantInformation", {
        //发送请求
        params: {
          pageNum,
          size,
          ...params,
        },
      })
      .then((resp) => resp.data);
  },
  removeAll(ids) {
    return api.delete("/plantInformation", { data: ids }).then((resp) => resp.data);
  },
  save(plantInformation) {
    return api.post("/plantInformation", plantInformation).then((resp) => resp.data);
  },
  update(plantInformation) {
    return api.put("/plantInformation", plantInformation).then((resp) => resp.data);
  }
};

export default plantInformationApi;
